package me.helllp.book.concurrent.ch05;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

public class Div implements Runnable {
	public static BlockingQueue<Msg> bq = new LinkedBlockingQueue<Msg>();
	
	@Override
	public void run() {
		try {
			while(true){
				Msg msg = bq.take();
				msg.i = msg.i / 2;
				System.out.println(msg.orgStr + " = " + msg.i);
			}
		} catch (InterruptedException e) {
			// TODO: handle exception
		}
	}

}
